package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import bean.JPanelIcon;

import javabean.JPanelImagen;

import javax.swing.ImageIcon;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class frmHome extends javax.swing.JFrame {
	private JPanelImagen pnhome; 
	private JPanel pndatos;
	private JMenuBar mnuhome;
	private JMenu mnumaestro;
	private JMenu mnuconsulta;
	private JMenuItem mnuifresa;
	private JMenuItem mnuiconsultadeuda;
	private JMenuItem mnuipago;
	private JMenuItem mnuiunidades;
	private JMenuItem mnuicompra;
	private JMenuItem mnuiventa;
	private JMenuItem mnuiusuario;
	private JMenuItem mnuiproductos;
	private JMenuItem mnuicliente;
	private JMenuItem mnuisalir;
	private JMenu mnusalir;
	private JOptionPane mensaje;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				frmHome inst = new frmHome();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public frmHome() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
			this.setTitle("Sistema de Administracion de Compra de Fresas y Venta de Productos");
			this.setName("");
			this.setFocusable(false);
			{
				pndatos = new JPanelImagen();
				getContentPane().add(pndatos, BorderLayout.CENTER);
				((JPanelImagen) pndatos).setRutaImagen("/imagen/im.png");
				mnuhome = new JMenuBar();
				setJMenuBar(mnuhome);
				mnuhome.setBackground(new java.awt.Color(255,255,255));
				{
					mnumaestro = new JMenu();
					mnuhome.add(mnumaestro);
					mnumaestro.setText("Gestionar Archivos");
					mnumaestro.setFont(new java.awt.Font("FreeSerif",1,16));
					{
						mnuicliente = new JMenuItem();
						mnumaestro.add(mnuicliente);
						mnuicliente.setText("Gestionar Clientes");
						mnuicliente.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuicliente.setBackground(new java.awt.Color(255,255,255));
						mnuicliente.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/business_user.png")));
					}
					{
						mnuifresa = new JMenuItem();
						mnumaestro.add(mnuifresa);
						mnuifresa.setText("Gestionar Fresas");
						mnuifresa.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuifresa.setBackground(new java.awt.Color(255,255,255));
						mnuifresa.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/1_24.png")));
					}
					{
						mnuiproductos = new JMenuItem();
						mnumaestro.add(mnuiproductos);
						mnuiproductos.setText("Gestionar Productos");
						mnuiproductos.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuiproductos.setBackground(new java.awt.Color(255,255,255));
						mnuiproductos.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/Fork Lift Cargo.png")));
					}
					{
						mnuiventa = new JMenuItem();
						mnumaestro.add(mnuiventa);
						mnuiventa.setText("Gestionar Ventas ");
						mnuiventa.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuiventa.setBackground(new java.awt.Color(255,255,255));
						mnuiventa.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/open_safety_box.png")));
					}
					{
						mnuicompra = new JMenuItem();
						mnumaestro.add(mnuicompra);
						mnuicompra.setText("Gestionar Compras");
						mnuicompra.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuicompra.setBackground(new java.awt.Color(255,255,255));
						mnuicompra.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/shopping_cart_accept.png")));
					}
					{
						mnuipago = new JMenuItem();
						mnumaestro.add(mnuipago);
						mnuipago.setText("Gestionar Pagos");
						mnuipago.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuipago.setBackground(new java.awt.Color(255,255,255));
						mnuipago.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/calculator.png")));
					}
					{
						mnuiusuario = new JMenuItem();
						mnumaestro.add(mnuiusuario);
						mnuiusuario.setText("Gestionar Usuario");
						mnuiusuario.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuiusuario.setBackground(new java.awt.Color(255,255,255));
						mnuiusuario.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/user.png")));
					}
					{
						mnuiunidades = new JMenuItem();
						mnumaestro.add(mnuiunidades);
						mnuiunidades.setText("Gestionar Unidades");
						mnuiunidades.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuiunidades.setBackground(new java.awt.Color(255,255,255));
						mnuiunidades.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/folder_edit.png")));
					}
				}
				{
					mnuconsulta = new JMenu();
					mnuhome.add(mnuconsulta);
					mnuconsulta.setText("Consultas");
					mnuconsulta.setFont(new java.awt.Font("FreeSerif",1,16));
					{
						mnuiconsultadeuda = new JMenuItem();
						mnuconsulta.add(mnuiconsultadeuda);
						mnuiconsultadeuda.setText("Consultas de Deudas de los Clientes");
						mnuiconsultadeuda.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuiconsultadeuda.setBackground(new java.awt.Color(255,255,255));
						mnuiconsultadeuda.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/consulta.png")));
					}
				}
				{
					mnusalir = new JMenu();
					mnuhome.add(mnusalir);
					mnusalir.setText("Salir");
					mnusalir.setFont(new java.awt.Font("FreeSerif",1,16));
					{
						mnuisalir = new JMenuItem();
						mnusalir.add(mnuisalir);
						mnuisalir.setText("Salir");
						mnuisalir.setFont(new java.awt.Font("FreeSerif",1,16));
						mnuisalir.setBackground(new java.awt.Color(255,255,255));
						mnuisalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Iconos/record.png")));
					}
				}
			}
			{
				//pndatos = new JPanel();
				//getContentPane().add(pndatos, BorderLayout.CENTER);
				//pndatos.setBackground(new java.awt.Color(239,171,183));
				//pndatos.setLayout(null);
				//pndatos.setPreferredSize(new java.awt.Dimension(813, 365));
			}
			this.setFocusCycleRoot(false);
			this.setFocusTraversalPolicyProvider(true);
			pack();
			this.setSize(1056, 648);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public JPanel getPndatos() {
		return pndatos;
	}

	public JMenuBar getMnuhome() {
		return mnuhome;
	}

	public JMenu getMnumaestro() {
		return mnumaestro;
	}

	public JMenu getMnuconsulta() {
		return mnuconsulta;
	}

	public JMenuItem getMnuifresa() {
		return mnuifresa;
	}

	public JMenuItem getMnuiconsultadeuda() {
		return mnuiconsultadeuda;
	}

	public JMenuItem getMnuipago() {
		return mnuipago;
	}

	public JMenuItem getMnuiunidades() {
		return mnuiunidades;
	}

	public JMenuItem getMnuicompra() {
		return mnuicompra;
	}

	public JMenuItem getMnuiventa() {
		return mnuiventa;
	}

	public JMenuItem getMnuiusuario() {
		return mnuiusuario;
	}

	public JMenuItem getMnuiproductos() {
		return mnuiproductos;
	}

	public JMenuItem getMnuicliente() {
		return mnuicliente;
	}

	public JMenuItem getMnuisalir() {
		return mnuisalir;
	}

	public JMenu getMnusalir() {
		return mnusalir;
	}
	
	public JPanelImagen getPnhome() {
		return pnhome;
	}

	public JOptionPane getMensaje() {
		return mensaje;
	}

	public void AgregarEscuchadores(ActionListener actionlistener){
		this.mnuicliente.addActionListener(actionlistener);
		this.mnuicompra.addActionListener(actionlistener);
		this.mnuiconsultadeuda.addActionListener(actionlistener);
		this.mnuifresa.addActionListener(actionlistener);
		this.mnuipago.addActionListener(actionlistener);
		this.mnuiproductos.addActionListener(actionlistener);
		this.mnuisalir.addActionListener(actionlistener);
		this.mnuiunidades.addActionListener(actionlistener);
		this.mnuiusuario.addActionListener(actionlistener);
		this.mnuiventa.addActionListener(actionlistener);
	}
}
